package demo

import (
	"bytes"
	"fmt"
	"io"

	"github.com/gin-gonic/gin"
)

func Original() {
	Router := gin.Default()
	Router.POST("/original", func(c *gin.Context) {
		byteData, _ := io.ReadAll(c.Request.Body)
		//c.Request.Body 读完就销毁 阅后即焚
		//重新在写回去 解决阅后即焚
		c.Request.Body = io.NopCloser(bytes.NewBuffer(byteData))
		fmt.Println(c.Request.Body)
	})
	Router.Run(":8080")
}
